<template>
  <div class="user-container">
    <template v-if="mode===0">
      <Menu></Menu>
    </template>
    <template v-if="mode===1">
      <Info></Info>
    </template>
    <template v-if="mode===2">
      <History></History>
    </template>
  </div>
</template>

<script>
  import Info from './User/GDFunctionUserInfo'
  import Menu from './User/GDFunctionUserMenu'
  import History from './User/GDFunctionUserHistory'

  export default {
    name: "GDFunctionUser",
    components: {Info, Menu, History},
    computed: {
      mode() {
        return this.$store.state.select;
      }
    },
    mounted() {
      this.$store.commit('setSel', 0);
    }
  }
</script>

<style scoped>
  .user-container {
    width: 100%;
  }
</style>
